package ch03.d1;

public class Person {
    // 属性 包含的数据
    public String name;
    public int age;
    public String tel;

    private int n1;
    int n2;
    protected  int n3;
    public int n4;




    public String school;
    // 方法 能干的事情
    public void sayHello() {
        System.out.println("大家好，我是" + name + "，今年" + age + "岁，我的电话是" + tel);
    }
    public void sing(){
        System.out.println("我会唱歌");
        n1=10;
        System.out.println(n1);
    }
    // x,y 形式参数
    public void compute(int x,int y){
        int result= x + y;
        System.out.println(result);
    }

    public int compute2(int x,int y){
        int result= x + y;
        return result;
    }


}
